package com.demo.validate;

/**
 * @author sdyang
 * @create 2019-01-22 17:41
 **/
public class ValidateTest {

    public static void main(String[] args) {

        FieldDataValidate dataValidate;

        FieldVO field = new FieldVO();
        field.setValue("12321@qq.com");
        field.setDataType("Email");

        FieldDataType fieldDataType = FieldDataType.parse(field.getDataType());
        dataValidate = fieldDataType.getDataValidate();
        boolean result = dataValidate.check(field.getValue());
        System.out.println(result);
    }
}
